package com.wys.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author NICK_WYS
 * @date 2021/1/20
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        I18nResInterceptor i18nResInterceptor = new I18nResInterceptor();
        registry.addInterceptor(i18nResInterceptor);
        WebMvcConfigurer.super.addInterceptors(registry);
    }
}
